from pydantic import BaseModel, Field
from typing import Optional, List


class RoleCreate(BaseModel):
    name: str = Field(..., description="角色名称")
    desc: Optional[str] = Field(None, description="角色描述")
    status: Optional[bool] = Field(True, description="状态：True启用，False禁用")


class RoleUpdate(BaseModel):
    name: Optional[str] = Field(None, description="角色名称")
    desc: Optional[str] = Field(None, description="角色描述")
    status: Optional[bool] = Field(None, description="状态：True启用，False禁用")


class RolePermissionsUpdateRequest(BaseModel):
    permission_ids: List[int] = Field(..., description="权限ID列表（菜单/权限）")